
<script type="text/javascript">
    $(document).ready(function(){
        // Show notification
        $('#bt_new_message').click(function(event){
            var new_left = $(this).position().left - ($('.notification_panel').width() - $(this).width()) / 2;
            $('.notification_panel').css('left',new_left + 'px');
            $('.notification_panel').toggle();
            var isHidden = $(".notification_panel").is( ":hidden" );
            $('.notification_panel').empty();
            if(!isHidden)
            {        $.post('~user/loadNofication',{},function(data){
                    if(data !='')
                    {
                        $('.count_notification').text('');
                        $('.count_notification').css('display','none');
                        $('.notification_panel').append(data);
                    }
                });
            }
            event.stopPropagation();
        });

        $('.notification_panel').on('click','.li_comment_nofication',function(){
            var product = $(this).find('.id_comment_product').text();
            var url =$('#path').val()+'product/id/' +product;
            var win=window.open(url, '_newtab');
            win.focus();
        });


    });
</script>
<a id="bt_new_message" href="javascript:void(0);" class="header_button"><i class="fa fa-bell-o"></i><label class="count_notification"></label></a>
<div class="notification_panel"></div>
